package com.hbzhit.common.enums;

import lombok.Getter;

/**
 * 消息通知-系统消息类别
 *
 * @author Tiger.Zhang
 * 2020-01-09 10:35
 */
@Getter
public enum NmNoticeCategoryEnum implements BaseOptionEnum {

    /*通知*/
    NOTICE(1, "通知"),
    /*待办*/
    TODO(2, "待办"),
    /*预警*/
    ALERT(3, "预警");

    private final int value;
    private final String name;

    NmNoticeCategoryEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public static NmNoticeCategoryEnum getEnum(int value) {
        for (NmNoticeCategoryEnum item : NmNoticeCategoryEnum.values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
